﻿// 2. Write a method GetMax() with two parameters that returns the bigger of two integers. Write a program that reads 3 integers 
// from the console and prints the biggest of them using the method GetMax().

using System;

class GetMaxMethod
{
    static void Main()
    {
        Console.Write("Please, enter first number : ");
        int number1 = int.Parse(Console.ReadLine());
        Console.Write("Please, enter second number : ");
        int number2 = int.Parse(Console.ReadLine());
        Console.Write("Please, enter third number : ");
        int number3 = int.Parse(Console.ReadLine());

        int biggerNumber = GetMax(number1, number2);
        int biggestNumber = GetMax(number3, biggerNumber);

        Console.WriteLine("The biggest of numbers {0}, {1} and {2} is {3}.", number1, number2, number3, biggestNumber);
    }

    static int GetMax(int number1, int number2)
    {
        if (number1 > number2)
        {
            return number1;
        }
        else
        {
            return number2;
        }
    }
}